(1) Field of the Invention
The present-invention relates to a debugging aid device and a compiling device that provide aid in debugging object programs into which source programs have been translated.
(2) Description of the Related Art
It has been long since there were demands for improvement of computer program quality, along with the development of advanced information technology. In the fields of program development, people have been constantly seeking for ways to make programmers' debugging process more efficient through trial and error.
An object program, which is the final product, is generated with use of a compiler that translates a source program written in a high-level programming language. Debugging is to run an object program on an exploratory basis, so as to correct the source program if there is any problem, and make a new object program from the corrected source program. A debugging aid device makes debugging more efficient with such functions as “breakpoint setting” to set a breakpoint at an arbitrary point of an object program so that the program halts at that point; “one-step execution” to execute one instruction at a time after the halt; and “resource reference” to indicate, in the halting state, the value held by the hardware resource. In addition, there is a function to indicate a source code that corresponds to the instruction at which a breakpoint is set, and this function helps correction process of the source program in case bugs are found.
Recent program development often experiences a situation where debugging is necessary for an object program optimized for parallel processing. Examples of methods of optimizing an object program for parallel processing are Loop Unrolling and Software Pipelining. Especially, an object program with the latter, Software Pipelining, includes repeating units (called iterations) of a loop each made up of instructions, so that instructions that belong to different iterations can be executed in pipelining parallelism. In order to debug an object program with software pipelining, programmers focus on finding out which instructions are to be executed in parallel, and which lines of a source code those instructions correspond to; however, execution of an object program with software pipelining involves special processing i.e. an iteration is executed with a little delay from its previous iteration, instead of instructions in different iterations being executed completely in parallel; therefore, it is difficult to express this special processing with source codes.
On the other hand, if no source codes were indicated to show corresponding instructions to be executed in parallel, it would make burdens for programmers. A programmer is required to thoroughly understand the correspondence between the source codes he or she writes and instructions in an object program, as well as to debug the program imagining how the program will be processed when being executed in pipeline. This presents a problem that debugging procedure makes slower progress than expected.